package formater

import "encoding/base64"

// Base64 base64格式化器
var Base64 = NewFormater(
	"base64",
	base64.StdEncoding.EncodeToString,
	base64.StdEncoding.DecodeString,
)

// Base64URL base64url格式化器
var Base64URL = NewFormater(
	"base64url",
	base64.URLEncoding.EncodeToString,
	base64.URLEncoding.DecodeString,
)

// Base64RawURL base64url格式化器，不使用'+'和'/'进行填充
var Base64RawURL = NewFormater(
	"base64rawurl",
	base64.RawURLEncoding.EncodeToString,
	base64.RawURLEncoding.DecodeString,
)

// Base64RawStd base64格式化器，不使用'+'和'/'进行填充
var Base64RawStd = NewFormater(
	"base64rawstd",
	base64.RawStdEncoding.EncodeToString,
	base64.RawStdEncoding.DecodeString,
)
